from decimal import *
a=Decimal('1')/Decimal('3')
print(type(a)),print(a)
context=getcontext()
context.prec=2
a=Decimal('1')/Decimal('3')
print(type(a)),print(a)
a=Decimal('10')/Decimal('3')
print(type(a)),print(a)
with localcontext() as local:
    local.prec =3
    a=Decimal('1')/Decimal('3')
    b=Decimal('10')/Decimal('3')
    print(type(a)),print(a)
    print(type(b)),print(b)